{include file="Main/menu" /}
<form method="post">
    <div class="panel admin-panel" style="background: #fff">
        <div class="panel-head"><strong>{:lang('currency')['list']}</strong></div>
        <div class="padding border-bottom">
            <input type="button" class="button button-small checkall" name="checkall" onclick="Select_All()" checkfor="id" value="{:lang('currency')['all_select']}" />
            <a type="button" class="button button-small border-green" href="#" />{:lang('currency')['add']}</a>
            <a id="select_del" type="button" class="button button-small border-red" href="#" />{:lang('currency')['del']}</a>
            <a href="javascript:set()" class="button button-small">功能设置</a>
            <script>
                //city 参数和回调
                var pid="{:input('get.pid')}";
                var cid="{:input('get.cid')}";
                var aid="{:input('get.aid')}";
                var selectc = true;
                var selecta = true;
                function select_p(){
                    return false;
                }
                function select_c(){
                    return false;
                }
                function select_a(){
                    location.href="?pid="+pid+"&cid="+cid+"&aid="+aid;
                }
            </script>
            {:lang('label')['select']}{:lang('currency')['city']}:{include file="public/city" /}
        </div>
        <table class="am-table am-table-striped am-table-hover table-main">
            <tr>
                <th width='100'>省</th>
                <th width='100'>市</th>
                <th width='100'>县</th>
                <th width="100">抽成金额</th>
                <th width="100">类型</th>
            </tr>
            {volist name="data" id="finance"}
                <tr>
                    
                    <td style="line-height:30px">{$finance.province}</td>
                    <td style="line-height:30px">{$finance.city}</td> 
                    <td style="line-height:30px;">{$finance.area}</td>
                    <td style="line-height:30px;width:56px;">{$finance.system_money}</td>
                    <td style="line-height:30px">{if $finance.type == '1'}平台抽成{elseif $finance.type == '2'}地方抽成{/if}</td> 
                </tr>
            {/volist}
        </table>
        {include file="public/pages"/}
    </div>
</form>
<script>
    $('#select_del').click(function(){
        var str="";
        $("input:checkbox[name=box]:checked").each(function(){
            str+=$(this).val()+",";
        });
        if(str!==''){
            if(confirm("{:lang('currency')['del']}?")){
                location.href='__URL__/del.html?id='+str;
            }
        }
    });
    function Select_All() {
        var box = $("input[name='box']");
        for (var i in box){
            box[i].checked = !box[i].checked;
        }
    }
    function show_edit(url) {
        layer.open({
            type:2,
            title:'',
            area: ['500px', '487px'],
            content:url
        })
    }
    function set() {
        layer.open({
            type:2,
            title:'',
            area: ['700px', '375px'],
            content:'__URL__/set'
        })
    }
    function rl() {
        setTimeout(function () {
            window.location.reload();
        },700)
    }
</script>
{include file="Main/menu_footer" /}